
<%@ page import="your_car_status.Inventory" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<!DOCTYPE html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'inventory.label', default: 'Inventory')}" />
		<title>List Inventory</title>
	</head>
	<body>
		<a href="#list-inventory" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div id="list-inventory" class="content scaffold-list" role="main">
			<h1><g:message code="List Inventory" /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<table>
				<thead>
					<tr>
					
                                  		<g:sortableColumn property="date" title="${message(code: 'inventory.date.label', default: 'Date')}" />

						<g:sortableColumn property="engineOilLevel" title="${message(code: 'inventory.engineOilLevel.label', default: 'Engine Oil Level')}" />
					
						<g:sortableColumn property="fuelLevel" title="${message(code: 'inventory.fuelLevel.label', default: 'Fuel Level')}" />
					
						<g:sortableColumn property="airC" title="${message(code: 'inventory.airC.label', default: 'Air C')}" />
					
						<g:sortableColumn property="antena" title="${message(code: 'inventory.antena.label', default: 'Antena')}" />
					
						<g:sortableColumn property="apron" title="${message(code: 'inventory.apron.label', default: 'Apron')}" />
					
						<g:sortableColumn property="ashtray" title="${message(code: 'inventory.ashtray.label', default: 'Ashtray')}" />
					
					</tr>
				</thead>
				<tbody>
				<g:each in="${inventoryInstanceList}" status="i" var="inventoryInstance">
					<tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
					
						<td><g:link action="editInventory" id="${inventoryInstance.id}">${fieldValue(bean: inventoryInstance, field: "date")}</g:link></td>
					
                                                <td>${fieldValue(bean: inventoryInstance, field: "engineOilLevel")}</td>
                                                
						<td>${fieldValue(bean: inventoryInstance, field: "fuelLevel")}</td>
					
						<td><g:formatBoolean boolean="${inventoryInstance.airC}" true="Yes" false="No" /></td>
					
						<td><g:formatBoolean boolean="${inventoryInstance.antena}" true="Yes" false="No" /></td>
					
						<td><g:formatBoolean boolean="${inventoryInstance.apron}" true="Yes" false="No" /></td>
					
						<td><g:formatBoolean boolean="${inventoryInstance.ashtray}" true="Yes" false="No" /></td>
					
					</tr>
				</g:each>
				</tbody>
			</table>
		</div>
                <g:form method="post" >
                  <fieldset class="buttons">
                    <g:link class="list" action="newInventory" id="${carId}">Create</g:link>
                    <g:actionSubmit class="save" action="listVehicle" value="${message(code: 'Return')}" />
                  </fieldset>
                </g:form>
	</body>
</html>
